from flask_cors import CORS
from flask import Flask

from hotai.background_view import background_view
from views.reg.reg import bp_reg
from views.vuser_view import user_view

app = Flask(__name__)
# 解决中文代码
app.config['JSON_AS_ASCII'] = False
app.register_blueprint(user_view)
app.register_blueprint(bp_reg)
app.register_blueprint(background_view)
CORS(app)

@app.route('/')
async def hello_world():
    return 'Hello World!'


if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0', port=5000)
